import mutations from './mutations'
import actions from './actions'
import { initialState } from './types'

const authority = {
  namespaced: true,
  state: () => ({ ...initialState }),
  getters: {
    // 判断是否登录的依据
    isLogin (state) {
      return !!state.adminname
    }
  },
  mutations,
  actions,
}

export default authority
